/**
 *  关于消息相关api
 */
import {
	http
} from '@/api/config.js'

const config = {
	custom: {
		loadinHide: true
	}
}
/**
 * 分页查询聊天消息列表
 */
export const getChatMessageList = (param) => {
	return http.post('/message/chat/list', {
		...param
	}, config)
}

/**
 * 分页查询聊天消息详情
 */
export const getChatMessageDetail = (param, receiverId) => {
	return http.post('/message/chat/detail/' + receiverId, {
		...param
	}, config)
}

/**
 * 变更消息列表置顶状态
 */
export const updateTop = (receiverId, isTop) => {
	return http.put('/message/chat/top/' + receiverId + '/' + isTop, {}, config)
}

/**
 * 变更消息列表删除状态
 */
export const updateDelete = (receiverId, isDelete) => {
	return http.put('/message/chat/delete/' + receiverId + '/' + isDelete, {}, config)
}